import { getProducts } from "../api/dashboard";
import { updateOrder } from "../api/store";

export const API = {
    userLogin: '/auth/user/login',
    adminLogin: '/auth/admin/login',

    getOrdersById: '/dashboard/order/:id',
    getCategoriesById: '/dashboard/category/:id',
    getProductsById: '/dashboard/product/:id',
    getUsersById: '/dashboard/user/:id',
    getRoles: '/dashboard/role',
    updateCategories: '/dashboard/update_categories',
    updateProducts: '/dashboard/update_products',
    updateUsers: '/dashboard/update_users',
    updateOrders: '/dashboard/update_orders',
    deleteOrders: '/dashboard/delete_orders/:id',
    deleteCategories: '/dashboard/delete_categories/:id',
    deleteProducts: '/dashboard/delete_products/:id',
    deleteUsers: '/dashboard/delete_users/:id',


    getHotProducts: '/frontend/product/hot',
    getProducts: '/frontend/product',
    getCategories: '/frontend/categories',
    getBanners: '/frontend/banner',
    addOrder: '/frontend/addOrder',
    getProductDetailById: '/frontend/product/detail/:id',
    cancelOrder: '/frontend/cancelOrder',
    updateOrderById: '/frontend/updateOrder',
    getProductByCategory: '/frontend/product/category/:id',
    
    // 收藏相关接口
    getFavorites: '/frontend/favorites',
    addFavorite: '/frontend/favorites/add',
    removeFavorite: '/frontend/favorites/remove',
    checkFavorite: '/frontend/favorites/check/:id',
}